<template>
	<div>
        <h1>input:</h1>
		<el-input v-if="enable" :disabled="disabled" v-model="model" />
		<span v-else>{{ value || '---' }}</span>
	</div>
</template>

<script>
export default {
	props: {
		value: { type: String },
		enable: { type: Boolean },
		disabled: { type: Boolean },
	},
    data(){
        return {
            model: ''
        }
    },
	watch: {
		model(newVal) {
			this.$emit('input', newVal)
		},
	},
}
</script>

<style>
</style>